<?php
/**
 * View do formulário de anotacao
 * @filesource  06/04/2011
 * @author      Estrada Virtual <http://estradavirtual.com.br>
 * @copyright   Copyright <2011> Estrada Virtual
 * @package     <<application>>
 * @subpackage  <<application>>.application.views
 * @version     $Id$
 */
 ?>
<div class="ev-formulario">
    <h1><?php echo $this->translate('id_anotacao'); ?></h1>
    <form action="<?php echo $this->baseUrl() ?>/corporativo/anotacao/gravar" method="post" name="formulario" id="formulario">
        <input type="hidden" name="id_anotacao" id="id_anotacao" value="<?php echo $this->row->id_anotacao; ?>" />

        <label for="fk_cliente"><?php echo $this->translate('fk_cliente'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_cliente", $this->row->fk_cliente, array( "id" => "fk_cliente", "title" => $this->translate("fk_cliente"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_cliente"]); ?><br />

        <label for="fk_usuario"><?php echo $this->translate('fk_usuario'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_usuario", $this->row->fk_usuario, array( "id" => "fk_usuario", "title" => $this->translate("fk_usuario"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_usuario"]); ?><br />

        <label for="fk_projeto"><?php echo $this->translate('fk_projeto'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_projeto", $this->row->fk_projeto, array( "id" => "fk_projeto", "title" => $this->translate("fk_projeto"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_projeto"]); ?><br />

        <label for="fk_servico"><?php echo $this->translate('fk_servico'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_servico", $this->row->fk_servico, array( "id" => "fk_servico", "title" => $this->translate("fk_servico"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_servico"]); ?><br />

        <label for="fk_tarefa"><?php echo $this->translate('fk_tarefa'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_tarefa", $this->row->fk_tarefa, array( "id" => "fk_tarefa", "title" => $this->translate("fk_tarefa"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_tarefa"]); ?><br />

        <label for="st_anotacao"><?php echo $this->translate('st_anotacao'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <textarea class="text ui-widget-content ui-corner-all  required " name="st_anotacao" id="st_anotacao" title="<?php echo $this->translate('st_anotacao'); ?>" ><?php echo $this->row->st_anotacao; ?></textarea><br />

        <div id="botoesAcao">
            <input type="submit" class="btSalvar" name="enviar" id="enviar" value="Enviar" />
            <input type="button" class="btExcluir" name="cancelar" id="cancelar" value="Cancelar" />
        </div>
    </form>
</div>

<script type="text/javascript">
    $().ready(function() {
        $("form").validate();
        $('#cancelar').click(function(){
            window.location = "<?php echo $this->baseUrl() ?>/corporativo/anotacao";
        });
    });
</script>